package com.sky.mapper;

import com.sky.entity.User;
import org.apache.ibatis.annotations.Mapper;

import java.time.LocalDateTime;

/**
 * @Description UserMapper
 * @Author liuqiang
 * @Date 2024/2/23
 */
@Mapper
public interface UserMapper {
    /**
     * 根据openid查询User信息
     * @param openid
     * @return
     */
    User getUserByOpenid(String openid);

    /**
     * 新增用户信息
     * @param user
     */
    void insertUser(User user);

    /**
     * 根据id查询用户信息
     * @param id
     * @return
     */
    User getUserById(Long id);

    /**
     * 根据create_time获取用户数量
     * @param beginTime
     * @param endTime
     * @return
     */
    Integer getUserCount(LocalDateTime beginTime, LocalDateTime endTime);
}
